home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
L' Effet Pommier 3
/
L'Effet Pommier - Volume 03.iso
/
Programmation
/
Alpha ƒ
/
Tcl
/
SystemCode
/
ada.tcl
next >
Wrap
Text File
|
1996-01-21
|
2KB
|
59 lines
#===============================================================================
# From Raymond Waldrop <rwaldrop@cs.tamu.edu>
#===============================================================================
newModeVar Ada elecRBrace {1} 1
newModeVar Ada leftFillColumn {3} 0
newModeVar Ada prefixString {-- } 0
newModeVar Ada electricSemi {1} 1
newModeVar Ada wordBreak {[a-zA-Z0-9_]+} 0
newModeVar Ada elecLBrace {1} 1
newModeVar Ada wordWrap {0} 1
newModeVar Ada funcExpr {^[ \t]*(procedure|function)[ \t]+([A-Za-z][A-Za-z0-9_]*)} 0
newModeVar Ada wordBreakPreface {} 0
newModeVar Ada electricTab {0} 1
# Don't get used!
#set adaCommentRegexp {/\*(([^*]/)|[^*]|\r)*\*/}
#set adaPreRegexp {^\#[\t ]*[a-z]*}
set adaKeyWords {
abort abs accept access all and array at begin body case constant
declare delay delta digits do else elsif end entry exception exit
for function generic goto others if in is limited loop mod new not
null of or subtype out package pragma private procedure raise range
record rem renames return reverse select separate task terminate
then type use when while with xor = /= := > < abstract aliased
protected requeue tagged until
}
regModeKeywords -e {--} -c magenta -k blue Ada $adaKeyWords -i ")" -i "(" -i ":" -i ";" -i "," -i "." -I blue
proc dummyAda {} {}
proc AdaMarkFile {} {
global AdamodeVars
set pos 0
while {![catch {search -s -f 1 -r 1 -m 0 -i 1 $AdamodeVars(funcExpr) $pos} res]} {
set start [lindex $res 0]
set end [expr [lindex $res 1] + 1]
set text [getText $start $end]
if {[regexp {(procedure|function)[ \t]+} $text dummy word]} {
set tmp $word
set start [expr $start + [string first $word $text] + [string length $word]]
set text [getText $start $end]
}
if {[regexp {([a-zA-Z0-9:_]+)} $text dummy word]} {
set tmp [expr $start + [string first $word $text]]
set inds($word) "$tmp [expr $tmp + [string length $word]]"
}
set pos $end
}
if {[info exists inds]} {
foreach f [lsort -ignore [array names inds]] {
set res $inds($f)
setNamedMark $f [lineStart [lindex $res 0]] [lindex $res 0] [lindex $res 1]
}
}
}